package com.newegg.whois.controller;

import java.io.IOException;
import java.net.SocketException;
import java.util.HashMap;
import java.util.Map;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping
public class MonitorAPI {
	
	@RequestMapping(value="/monitor", method = RequestMethod.GET)
	@ResponseBody
	public Map<String, Object> query() throws SocketException, IOException{
		Map<String, Object> data = new HashMap<>();
		data.put("complete", SearchAPI.complete);
		data.put("fail", SearchAPI.fail);
		return data;
	}
}
